package com.eight.pojo;

import java.io.Serializable;
import java.time.LocalDateTime;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * @TableName tb_user_coupon
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("tb_user_coupon")
@Accessors(chain = true)
public class TbUserCoupon implements Serializable {


    @ApiModelProperty("顺序编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("用户id")
    @TableField(value = "user_id")
    private Integer userId;

    @ApiModelProperty("用户名称")
    @TableField(value = "user_name")
    private String userName;

    @ApiModelProperty("优惠卷id")
    @TableField(value = "coupon_id")
    private Integer couponId;

    @ApiModelProperty("优惠卷名称")
    @TableField(value = "coupon_name")
    private String couponName;

    @ApiModelProperty("开始时间")
    @TableField(value = "start_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime startTime;

    @ApiModelProperty("优惠卷截至时间")
    @TableField(value = "stop_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime stopTime;

    @TableField(exist = false)
    private TbCoupon tbCoupon;

    /**
     * 这俩字段仅作为前端的展示
     */
    @TableField(exist = false)
    private Long stime;
    @TableField(exist = false)
    private Long etime;

}
